﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NMoq.Core
{
    public class SelectorFactory
    {
        public static Selector<TAction> CreateSelector<TAction>() where TAction :IAction 
        {
            if (typeof(TAction) == typeof(IDataProvider))
                return new DataProviderSelector() as Selector<TAction>;
            if (typeof(TAction) == typeof(IInterceptor))
                return new InterceptorSelector() as Selector <TAction>;
            if (typeof(TAction) == typeof(IVerifier))
                return new VerifierSelector() as Selector<TAction >;
            return default (Selector<TAction >);
        }
    }
}
